package day03_oop_code.com.itheima.d13_integer;

public class Test {
    public static void main(String[] args) {
        int a = 12;
        Integer it1 = Integer.valueOf(a);
        System.out.println("it1 = " + it1);
//        Integer it2 = new Integer(12);
//        System.out.println("it2 = " + it2);

        Integer it3 = 128;
        Integer it4 = 128;
        System.out.println("(it3 == it4) = " + (it3 == it4));

        int it5 = it3;
        System.out.println("it5 = " + it5);

        int it6 = 23;
        String rs1 = Integer.toString(it6);
        System.out.println("(rs1 + 1) = " + (rs1 + 1));

        Integer it7 = 23;
        String rs2 = it7.toString();
        System.out.println("(rs2 + 1) = " + (rs2 + 1));

        int a2 = 23;
        String rs3 = a2 + "";
        System.out.println("(rs3 + 1) = " + (rs3 + 1));

        String ageStr = "23";
        int age = Integer.parseInt(ageStr);
        System.out.println("age = " + age);
        int age1 = Integer.valueOf(ageStr);
        System.out.println("age1 = " + age1);
        System.out.println("(age1 + 1) = " + (age1 + 1));

        String scoreStr = "99.5";
        double score = Double.parseDouble(scoreStr);
        System.out.println("score = " + score);
        System.out.println("(score + 0.5) = " + (score + 0.5));
        Double score1 = Double.valueOf(scoreStr);
        System.out.println("score1 = " + score1);
        System.out.println("(score1 + 0.5) = " + (score1 + 0.5));
    }
}
